<?php

namespace Gnway\Ticket\Rest\Annotation\Cache;

use Gnway\Ticket\Rest\Mapping\PropertyMapping;
use Gnway\Ticket\Rest\Mapping\RouterMapping;

class AnnotationCacheTemplate
{

  /**
   * Cache version
   *
   * @var string|null
   */
  protected ?string $version = NULL;

  /**
   * Cache inject mapping
   *
   * @var PropertyMapping|null
   */
  private ?PropertyMapping $resourcesMapping = NULL;

  /**
   * Cache router mapping
   *
   * @var RouterMapping|null
   */
  private ?RouterMapping $routerMapping = NULL;

  /**
   * @param string $version
   */
  public function setVersion(string $version)
  {
    $this->version = $version;
  }

  /**
   * @return string|null
   */
  public function getVersion(): ?string
  {
    return $this->version;
  }

  /**
   * @param RouterMapping $routerMapping
   */
  public function setRouterMapping(RouterMapping $routerMapping): void
  {
    $this->routerMapping = $routerMapping;
  }

  /**
   * @return RouterMapping|null
   */
  public function getRouterMapping(): ?RouterMapping
  {
    return $this->routerMapping;
  }

  /**
   * @param PropertyMapping $resourcesMapping
   */
  public function setResourceMapping(PropertyMapping $resourcesMapping): void
  {
    $this->resourcesMapping = $resourcesMapping;
  }

  /**
   * @return PropertyMapping|null
   */
  public function getResourceMapping(): ?PropertyMapping
  {
    return $this->resourcesMapping;
  }
}